﻿#include "ssBinaryFile.h"


namespace StarSeeker
{

ssBinaryFile::ssBinaryFile(const char* name)
:ssIRes(name)
{
	m_type = SS_RES_BINARY;
}

ssBinaryFile::~ssBinaryFile()
{
}

bool ssBinaryFile::LoadFile(const char* path)
{
	SetPath(path);
	if (OpenFile(true))
	{
		if (ReadAll())
		{
			return true;
		}
		CloseFile();
	}
	return false;
}

const char* ssBinaryFile::GetBuffer()
{
	return ssReadFile::GetBuffer().Buf();
}

ulint ssBinaryFile::GetSize()
{
	return ssReadFile::GetBuffer().Size();
}

}
